package com.luo.backend.dto;

import java.util.Map;

/**
 * 系统配置响应DTO
 */
public class SystemConfigResponse {
    
    private AppConfig app;
    private DeliveryConfig delivery;
    private PaymentConfig payment;
    private GroupBuyingConfig groupBuying;
    private Map<String, Object> others;
    
    // 应用配置
    public static class AppConfig {
        private String name;
        private String version;
        private String logo;
        private String description;
        private String contactPhone;
        private String contactEmail;
        private String privacyPolicy;
        private String userAgreement;
        
        public AppConfig(String name, String version, String logo, String description, 
                        String contactPhone, String contactEmail, String privacyPolicy, String userAgreement) {
            this.name = name;
            this.version = version;
            this.logo = logo;
            this.description = description;
            this.contactPhone = contactPhone;
            this.contactEmail = contactEmail;
            this.privacyPolicy = privacyPolicy;
            this.userAgreement = userAgreement;
        }
        
        // Getters and Setters
        public String getName() { return name; }
        public void setName(String name) { this.name = name; }
        
        public String getVersion() { return version; }
        public void setVersion(String version) { this.version = version; }
        
        public String getLogo() { return logo; }
        public void setLogo(String logo) { this.logo = logo; }
        
        public String getDescription() { return description; }
        public void setDescription(String description) { this.description = description; }
        
        public String getContactPhone() { return contactPhone; }
        public void setContactPhone(String contactPhone) { this.contactPhone = contactPhone; }
        
        public String getContactEmail() { return contactEmail; }
        public void setContactEmail(String contactEmail) { this.contactEmail = contactEmail; }
        
        public String getPrivacyPolicy() { return privacyPolicy; }
        public void setPrivacyPolicy(String privacyPolicy) { this.privacyPolicy = privacyPolicy; }
        
        public String getUserAgreement() { return userAgreement; }
        public void setUserAgreement(String userAgreement) { this.userAgreement = userAgreement; }
    }
    
    // 配送配置
    public static class DeliveryConfig {
        private Double defaultFee;
        private Double freeDeliveryAmount;
        private Integer estimatedTime;
        private String[] timeSlots;
        
        public DeliveryConfig(Double defaultFee, Double freeDeliveryAmount, Integer estimatedTime, String[] timeSlots) {
            this.defaultFee = defaultFee;
            this.freeDeliveryAmount = freeDeliveryAmount;
            this.estimatedTime = estimatedTime;
            this.timeSlots = timeSlots;
        }
        
        // Getters and Setters
        public Double getDefaultFee() { return defaultFee; }
        public void setDefaultFee(Double defaultFee) { this.defaultFee = defaultFee; }
        
        public Double getFreeDeliveryAmount() { return freeDeliveryAmount; }
        public void setFreeDeliveryAmount(Double freeDeliveryAmount) { this.freeDeliveryAmount = freeDeliveryAmount; }
        
        public Integer getEstimatedTime() { return estimatedTime; }
        public void setEstimatedTime(Integer estimatedTime) { this.estimatedTime = estimatedTime; }
        
        public String[] getTimeSlots() { return timeSlots; }
        public void setTimeSlots(String[] timeSlots) { this.timeSlots = timeSlots; }
    }
    
    // 支付配置
    public static class PaymentConfig {
        private String[] methods;
        private Boolean enableWechat;
        private Boolean enableAlipay;
        private Boolean enableCash;
        
        public PaymentConfig(String[] methods, Boolean enableWechat, Boolean enableAlipay, Boolean enableCash) {
            this.methods = methods;
            this.enableWechat = enableWechat;
            this.enableAlipay = enableAlipay;
            this.enableCash = enableCash;
        }
        
        // Getters and Setters
        public String[] getMethods() { return methods; }
        public void setMethods(String[] methods) { this.methods = methods; }
        
        public Boolean getEnableWechat() { return enableWechat; }
        public void setEnableWechat(Boolean enableWechat) { this.enableWechat = enableWechat; }
        
        public Boolean getEnableAlipay() { return enableAlipay; }
        public void setEnableAlipay(Boolean enableAlipay) { this.enableAlipay = enableAlipay; }
        
        public Boolean getEnableCash() { return enableCash; }
        public void setEnableCash(Boolean enableCash) { this.enableCash = enableCash; }
    }
    
    // 团购配置
    public static class GroupBuyingConfig {
        private Integer maxParticipants;
        private Integer maxDurationHours;
        private Double discountRate;
        private Boolean enableAutoComplete;
        
        public GroupBuyingConfig(Integer maxParticipants, Integer maxDurationHours, Double discountRate, Boolean enableAutoComplete) {
            this.maxParticipants = maxParticipants;
            this.maxDurationHours = maxDurationHours;
            this.discountRate = discountRate;
            this.enableAutoComplete = enableAutoComplete;
        }
        
        // Getters and Setters
        public Integer getMaxParticipants() { return maxParticipants; }
        public void setMaxParticipants(Integer maxParticipants) { this.maxParticipants = maxParticipants; }
        
        public Integer getMaxDurationHours() { return maxDurationHours; }
        public void setMaxDurationHours(Integer maxDurationHours) { this.maxDurationHours = maxDurationHours; }
        
        public Double getDiscountRate() { return discountRate; }
        public void setDiscountRate(Double discountRate) { this.discountRate = discountRate; }
        
        public Boolean getEnableAutoComplete() { return enableAutoComplete; }
        public void setEnableAutoComplete(Boolean enableAutoComplete) { this.enableAutoComplete = enableAutoComplete; }
    }
    
    // 构造函数
    public SystemConfigResponse() {}
    
    // Getters and Setters
    public AppConfig getApp() { return app; }
    public void setApp(AppConfig app) { this.app = app; }
    
    public DeliveryConfig getDelivery() { return delivery; }
    public void setDelivery(DeliveryConfig delivery) { this.delivery = delivery; }
    
    public PaymentConfig getPayment() { return payment; }
    public void setPayment(PaymentConfig payment) { this.payment = payment; }
    
    public GroupBuyingConfig getGroupBuying() { return groupBuying; }
    public void setGroupBuying(GroupBuyingConfig groupBuying) { this.groupBuying = groupBuying; }
    
    public Map<String, Object> getOthers() { return others; }
    public void setOthers(Map<String, Object> others) { this.others = others; }
}

